package com.itheima.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.dto.DishDto;
import com.itheima.entity.Category;
import com.itheima.entity.Dish;
import org.springframework.transaction.annotation.Transactional;

public interface DishService extends IService<Dish> {
    //   新增菜品，同时插入菜品的口味数据，需要操作两张表：dish dishFlavor
    @Transactional
    public void saveWithFlavor(DishDto dishDto);

//根据id查询菜品信息和口味信息
    public DishDto getBYIdWithFlavor(Long id);

//更新dish基本信息和dishFlavor的口味
    @Transactional
    public void updateWithFlavor(DishDto dishDto);


}
